package org.mwiki.scala.bot.http

import collection.mutable.HashMap
import xml.Elem

/**
 * Created by IntelliJ IDEA.
 * User: ilya
 * Date: Apr 23, 2010
 * Time: 8:28:33 PM
 * To change this template use File | Settings | File Templates.
 */

class Cache {
  type QueryMap = Map[String, String] 
  type CacheMap[T] = collection.mutable.Map[Map[String, String], T] 
//  val responseStringCache: CacheMap[String] = new HashMap()
  val responseXmlCache: CacheMap[Elem] = new HashMap()


  def get(map: QueryMap) = {
    responseXmlCache(map)
  }

  def update(map: QueryMap, response: Elem) = {
    responseXmlCache(map) = response
  }


}